<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="renderer" content="webkit">
    <title>权限设置</title>
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/css/plugins/switchery/switchery.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeIn">
    <div class="row">
        <div class="col-sm-12">



                <div class="list-group">
                    <div href="#" class="list-group-item active">
                        用户管理
                    </div>
                    <div href="#" class="list-group-item">
                        查看用户列表
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input onclick="setAuth(this,'sys:user:index')" type="checkbox" th:checked="${codes.contains('sys:user:index')}" class="onoffswitch-checkbox" id="example1">
                                <label class="onoffswitch-label" for="example1">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>
                    <div href="#" class="list-group-item">
                        添加用户
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input type="checkbox" class="onoffswitch-checkbox" id="example2">
                                <label class="onoffswitch-label" for="example2">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>
                    <div href="#" class="list-group-item">
                        修改用户
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input type="checkbox" class="onoffswitch-checkbox" id="example3">
                                <label class="onoffswitch-label" for="example3">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>
                    <div href="#" class="list-group-item">
                        删除用户
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input type="checkbox" class="onoffswitch-checkbox" id="example4">
                                <label class="onoffswitch-label" for="example4">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>
                    <div href="#" class="list-group-item active">
                        用户组管理
                    </div>
                    <div href="#" class="list-group-item">
                       查看用户组列表
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input type="checkbox" class="onoffswitch-checkbox" id="example5">
                                <label class="onoffswitch-label" for="example5">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>
                    <div href="#" class="list-group-item">
                        添加用户组
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input type="checkbox" class="onoffswitch-checkbox" id="example6">
                                <label class="onoffswitch-label" for="example6">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>
                    <div href="#" class="list-group-item">
                        修改用户组信息
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input type="checkbox" class="onoffswitch-checkbox" id="example7">
                                <label class="onoffswitch-label" for="example7">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>
                    <div href="#" class="list-group-item">
                        删除用户组
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input type="checkbox" class="onoffswitch-checkbox" id="example8">
                                <label class="onoffswitch-label" for="example8">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>
                    <div href="#" class="list-group-item">
                        修改用户组权限
                        <span class="switch pull-right">
                            <div class="onoffswitch">
                                <input type="checkbox" class="onoffswitch-checkbox" id="example9">
                                <label class="onoffswitch-label" for="example9">
                                    <span class="onoffswitch-inner"></span>
                                    <span class="onoffswitch-switch"></span>
                                </label>
                            </div>
                        </span>
                    </div>



                </div>
        </div>
    </div>
</div>


<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script th:inline="javascript">
    var groupCode = /*[[${groupCode}]]*/;


    function setAuth(t,authCode) {

        if (t.checked) {
            $.post("/tySysAuthorityController/addAuthority",{groupCode:groupCode,authCode:authCode});
        } else {
            $.post("/tySysAuthorityController/delAuthority",{groupCode:groupCode,authCode:authCode});
        }


    }


</script>
</body>
</html>